.class public Llt/noframe/gpsfarmguide/showcase/core/PrefsManager;
.super Ljava/lang/Object;
.source "PrefsManager.java"


# static fields
.field public static SEQUENCE_FINISHED:I = -0x1

.field public static SEQUENCE_NEVER_STARTED:I


# instance fields
.field private context:Landroid/content/Context;

.field private showcaseID:Ljava/lang/String;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
    .locals 1

    .line 20
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x0

    .line 17
    iput-object v0, p0, Llt/noframe/gpsfarmguide/showcase/core/PrefsManager;->showcaseID:Ljava/lang/String;

    .line 21
    iput-object p1, p0, Llt/noframe/gpsfarmguide/showcase/core/PrefsManager;->context:Landroid/content/Context;

    .line 22
    iput-object p2, p0, Llt/noframe/gpsfarmguide/showcase/core/PrefsManager;->showcaseID:Ljava/lang/String;

    return-void
.end method

.method public static resetAll(Landroid/content/Context;)V
    .locals 2

    const-string v0, "material_showcaseview_prefs"

    const/4 v1, 0x0

    .line 64
    invoke-virtual {p0, v0, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object p0

    .line 65
    invoke-interface {p0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object p0

    invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->clear()Landroid/content/SharedPreferences$Editor;

    move-result-object p0

    invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->apply()V

    return-void
.end method


# virtual methods
.method public getSequenceStatus()I
    .locals 3

    .line 42
    iget-object v0, p0, Llt/noframe/gpsfarmguide/showcase/core/PrefsManager;->context:Landroid/content/Context;

    const-string v1, "material_showcaseview_prefs"

    const/4 v2, 0x0

    .line 43
    invoke-virtual {v0, v1, v2}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v0

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "status_"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v2, p0, Llt/noframe/gpsfarmguide/showcase/core/PrefsManager;->showcaseID:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    sget v2, Llt/noframe/gpsfarmguide/showcase/core/PrefsManager;->SEQUENCE_NEVER_STARTED:I

    .line 44
    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v0

    return v0
.end method

.method public hasFired()Z
    .locals 2

    .line 30
    invoke-virtual {p0}, Llt/noframe/gpsfarmguide/showcase/core/PrefsManager;->getSequenceStatus()I

    move-result v0

    .line 31
    sget v1, Llt/noframe/gpsfarmguide/showcase/core/PrefsManager;->SEQUENCE_FINISHED:I

    if-ne v0, v1, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    return v0
.end method
